package com.tfswx.jkgl.designer.api;

import com.tfswx.jkgl.designer.dto.export.ConfigExportInputDTO;
import com.tfswx.jkgl.designer.service.ExportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ricky
 * @date 2021/12/5
 */
@Api(tags = "导出指定项目的接口定义信息调用控制器")
@RestController
@RequestMapping("export")
public class ExportController {

    @Resource
    private ExportService exportService;

    @ApiOperation("导出指定项目配置信息")
    @GetMapping(value = "download", produces = "application/octet-stream")
    public void exportConfigFile(@Validated ConfigExportInputDTO request) {
        this.exportService.exportConfigFile(request);
    }

}
